Evaluates mathematical data.
Accepts a numerical value X as input and returns the absolute value of the number as the output.
Syntax:
| process eval("identifier=abs(X)")
Example:
| process eval ("Profit= Selling_price - cost_price")
| process eval ("abs_value=abs(Profit)")
| fields Selling_price, cost_price, Profit, abs_value
Using abs function¶
Here, the query first calculates the Profit field value. It then computes the absolute value of the Profit and returns its value in the abs_value identifier.
The fields command displays the value of Selling_price, cost_price, Profit and abs_value in a tabular form.
Accepts a numerical value X and returns the greatest integer less than or equal to X.
Syntax:
| process eval("identifier=floor(X)")
Example:
| process eval("price_per_unit=Selling_price/unit_sold")
| process eval("final_price = floor(price_per_unit)")
| fields Selling_price, unit_sold, price_per_unit, final_price
Floor function¶
Here, the query first calculates the price_per_unit field value. It then computes the greatest integer less than or equal to the value of Profit and returns its value in the final_price identifier.
The fields command displays the value of Selling_price, cost_price, Profit and abs_value in a tabular form.
Accepts a numerical value X and rounds the number up to the smallest following integer value.
Syntax:
| process eval("identifier=ceiling(X)")
Example:
| process eval("ceiling_duration=ceiling(duration)")
Using ceiling function¶
Here, the query accepts the duration field value and returns the smallest following integer value in the ceiling_duration identifier.
Accepts a numerical value X and evaluates the exponentiation with e base and X as the exponent, (e^X). You can also use expe instead of exp.
Syntax:
| process eval("identifier=exp(X)")
or
| process eval("identifier=expe(X)")
Example:
| process eval("result=exp(discount)") | fields discount, result
or
| process eval("result=expe(unit_sold)") | fields unit_sold, result
Using exp function¶
Using exp function¶
Here, the query evaluates the exponentiation to the e base of the discount field and returns it in the result identifier.
The fields command displays the value of discount and result in a tabular form.
Accepts a numerical value X and evaluates the exponentiation with 2 base and X as the exponent, (2^X).
Syntax:
| process eval("identifier=exp2(X)")
Example:
| process eval("result=exp2(unit_sold)") | fields unit_sold, result
Using exp2 function¶
Here, the query evaluates the exponentiation to the 2 base of the unit_sold field and returns it in the result identifier.
The fields command displays the value of unit_sold and result in a tabular form.
Accepts a numerical value X and evaluates the exponentiation with 10 base and X as the exponent, (10^X).
Syntax:
| process eval("identifier=exp10(X)")
Example:
| process eval("result=exp10(unit_sold)") | fields unit_sold, result
Using exp10 function¶
Here, the query evaluates the exponentiation to the 10 base of the unit_sold field and returns it in the result identifier.
The fields command displays the value of unit_sold and result in a tabular form.
Accepts a numerical value X and evaluates the logarithm of X with base e, (log_e(X)). You can also use the function loge instead of the function log.
Syntax:
| process eval("identifier=log(X)")
or
| process eval("identifier=loge(X)")
Example:
| process eval("result=log(unit_sold)") | fields unit_sold, result
or
| process eval("result=loge(unit_sold)") | fields unit_sold, result
Using log function¶
Using log function¶
Here, the query evaluates the logarithm to the e base of the unit_sold field and returns it in the result identifier.
The fields command displays the value of unit_sold and result in a tabular form.
Accepts a numerical value X and evaluates the logarithm of X with base 2, (log_2(X)).
Syntax:
| process eval("identifier=log2(X)")
Example:
| process eval("result=log2(unit_sold)") | fields unit_sold, result
Using log2 function¶
Here, the query evaluates the logarithm to the 2 base of the unit_sold field and returns it in the result identifier.
The fields command displays the value of unit_sold and result in a tabular form.
Accepts a numerical value X and evaluates the logarithm of X with base 10, (log_{mathrm{10}} (X)).
Syntax:
| process eval("identifier=log10(X)")
Example:
| process eval("result=log10(unit_sold)") | fields unit_sold, result
Using log10 function¶
Here, the query evaluates the logarithm to the 10 base of the unit_sold field and returns it in the result identifier.
The fields command displays the value of unit_sold and result in a tabular form.
Returns the first 12 digits of the value of pi. Unlike other functions, this function does not take any argument.
Syntax:
| process eval("identifier=pi()")
Example:
| process eval ("area_circle=pi() * (radius^2)")
| chart count () by radius, area_circle
Using pi function¶
Here, the query calculates the area of the circle where pi() gives the value of the mathematical constant (π). The query returns area in the area_circle identifier.
The chart count() command displays the count of the combination of radius and area_circle values as a chart and in a tabular form.
Accepts a numeric X value and returns the square root of the numeric value.
Syntax:
| process eval("identifier=sqrt(X)")
Example:
| process eval("result=sqrt(unit_sold)") | fields unit_sold, result
Using sqrt function¶
Here, the query returns the square root of the unit_sold field value in the unit_sold identifier.
The fields command displays the value of unit_sold and result in a tabular form.
Returns a random number ranging between 0 and 1. It does not take any argument. You can use this function in case you want a random number for any eval expression.
Syntax:
| process eval("identifier=random()")
Example:
| process eval("x=random()")
Using random function¶
Here, the query returns a random number between 0 and 1 in the x identifier.
Accepts a numeric calculation X and returns a result with a significant amount of precision.
Syntax:
| process eval("identifier=exact(X)")
Example:
| process eval("result=exact(3.4*unit_sold)") | fields unit_sold, result
Using exact function¶
Here, the query returns the precise value of the arithmetic expression 3.4*unit_sold in the result identifier.
The fields command displays the value of unit_sold and result in a tabular form.
Accepts up to two numeric arguments: X and Y, and rounds the value specified in X by the amount of decimal specified in Y. Here Y is optional, and in case Y is not defined, it rounds the value of X to the nearest integer by default.
Syntax:
| process eval("identifier=round(X,Y)")
Example 1:
| process eval("x=round(12.233)")
Result: x=12
Example 2:
| process eval("result=round(12.234,2)")
Using round function¶
Here, the query rounds up 12.234 to the hundredths (second decimal place) and returns its value in the result identifier.
Accepts one numeric field X and rounds that number to the appropriate number of significant figures. It ignores the decimal numbers if provided and takes only the numbers before the decimal point. It does not round the number that is in the 10th and 100th place.
Syntax:
| process eval("identifier=sigfig(X)")
If X is of 1000th place, the function rounds it to the nearest 10.
Example 1:
| process eval("result=sigfig(1111)")
Using sigfig function¶
Here, the query rounds up 1111 to the nearest 10 and returns its value in the result identifier.
If X is of 10000th place, the function rounds it to the nearest 100.
Example 2:
| process eval("x=sigfig(11111)")
Here, the query rounds up 11111 to the nearest 100 and returns its value in the result identifier.
We are glad this guide helped.
Please don't include any personal information in your comment
Contact Support